#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(&thread,&Thread::notice,this,&Widget::handle);
    thread.start();
}

Widget::~Widget()
{
    delete ui;
}

void Widget::handle()
{
   int val = ui->lcdNumber->intValue();
   val--;
   ui->lcdNumber->display(val);
}

